package cn.ekuma.epos.oa.model;

import cn.ekuma.data.ui.swing.AbstractDTOTableModel;
import cn.ekuma.epos.core.util.Utils;

import com.openbravo.bean.oa.AttenceExt;
import com.openbravo.pos.base.AppLocal;

public class AttenceExtTableModel extends AbstractDTOTableModel<AttenceExt> {
	public static String[] TABLECOLUMNS_OrderLine = new String[] {
		AppLocal.getIntString("Menu.Users"),
		AppLocal.getIntString("label.date"),
		AppLocal.getIntString("label.attenceType")
	};

@Override
public Object getValueAt(int rowIndex, int columnIndex) {
	AttenceExt value = getObj(rowIndex);
	switch (columnIndex) {
	case 0:
		return value.getUserInfo().getM_sName();
	case 1:
	     return Utils.sdf.format(value.getCreateDate());
	case 2:
		return value.getAttenceName();
	}
	return null;
}

@Override
public String[] getColumnNames() {
	return TABLECOLUMNS_OrderLine;
}
}